// $LastChangedBy$
// $Revision$
// $Date$
package com.clinic.entity.param;

/**
 * @author $LastChangedBy$
 * @version $Revision$ $Date$
 */
public final class Index {

	public static final int DEFAULT_START_INDEX = 0;
	public static final int DEFAULT_MAX_ITEMS = 5;
	
	public static final Index DEFAULT = new Index();
	
	private final int startIndex;
	private final int maxItems;
	
	public Index() {
		this(DEFAULT_START_INDEX, DEFAULT_MAX_ITEMS);
	}
		
	public Index(int maxItems) {
		this(DEFAULT_START_INDEX, maxItems);
	}
	
	public Index(int startIndex, int maxItems) {
		this.startIndex = startIndex;
		this.maxItems = maxItems;
	}
	
	public int getStartIndex() {
		return startIndex;
	}
	
	public int getEndIndex() {
		return startIndex + maxItems - 1;
	}
	
	public int getMaxItems() {
		return maxItems;
	}

}
